package com.dick.base.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dick.base.model.BaseOperateLog;
import com.dick.base.service.OperateLogService;
import com.dick.base.util.BaseResult;
import com.dick.base.util.PageInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 日志接口
 */
@RestController
@RequestMapping("api/logs")
public class LogApi {

    @Autowired
    private OperateLogService operateLogService;

    @ApiOperation(value = "分页查询", tags = "日志")
    @GetMapping
    public BaseResult<Page<BaseOperateLog>> operateLogPage(BaseOperateLog operateLog, PageInfo pageInfo) {
        return BaseResult.of(operateLogService.operateLogPage(operateLog, pageInfo));
    }
}
